package com;

/**
 * Helper..加载DDl
 *
 * @author Lizhong
 * @date 2019/5/28
 */
public class Helper {
  /*  public static void main(String[] args) throws NativeException {
        JNative.setLoggingEnabled(true);
        try {
            JNative getUrl = new JNative("EhfscliaxDll.dll", "getUrl");
            getUrl.setRetVal(Type.STRING);
            getUrl.setParameter(0, "127.0.0.1");
            getUrl.setParameter(1, 10087);
            getUrl.setParameter(2, 123);
            getUrl.invoke();
            System.out.println(getUrl.getRetVal());
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        try {
            JNative getPlayUrl = new JNative("EhfscliaxDll.dll", "getPlayUrl");
            getPlayUrl.setRetVal(Type.INT);

            String mgrIp = "127.0.0.1";
*//*
try {
mgrIp = new String(mgrIp.getBytes(), "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}*//*
            Pointer ptr = Pointer.createPointerFromString(mgrIp);

            getPlayUrl.setParameter(0, mgrIp);
            getPlayUrl.setParameter(1, 10087);
            getPlayUrl.setParameter(2, 123);
            getPlayUrl.invoke();

            String url = JNative.getMemoryAsString(getPlayUrl.getRetValAsInt());
//url = JNative.getMemoryAsString(getPlayUrl.getRetValAsInt(), 260, true);
*//*try {
url = new String(url.getBytes(), "utf-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}*//*
            System.out.println(url);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }
*/
}
